import React, { useContext } from 'react';
import cls from 'classnames';
import { Steps } from 'antd';
import { AuthorizationContext } from '../AuthHooks';
import { IAuthRoleGranSteps } from '../../type';

export const AuthRoleGranSteps: React.FC<IAuthRoleGranSteps> = ({}) => {
  const { prefixCls, stepsIndex } = useContext(AuthorizationContext); //获取 上下文
  const steps = [
    {
      title: '设置资源菜单',
    },
    {
      title: '设置数据范围',
    },
    {
      title: '设置功能操作',
    },
  ];

  return (
    <>
      <div className={cls(prefixCls + 'role-ColTitle')}>
        <div className={cls(prefixCls + 'divBox')}>
          <div className={cls(prefixCls + 'stepTitle')}>
            <Steps size="small" current={stepsIndex} items={steps} />
          </div>
        </div>
      </div>
    </>
  );
};
